/*
 * Copyright 2005-2010 Schlichtherle IT Services
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package de.schlichtherle.license;

/**
 * Thrown if validating a license certificate fails.
 *
 * @author Christian Schlichtherle
 * @version $Id: LicenseContentException.java,v 1.1 2012/05/13 13:41:19 palm Exp $
 */
public class LicenseContentException extends java.lang.Exception {
    private static final long serialVersionUID = 1L;
    
    /**
     * Constructs an instance of {@code LicenseContentException}
     * with the given {@code resourceKey} to lookup the localized detail
     * message with.
     *
     * @param resourceKey The key to use to lookup the localized detail
     *        message when {@link #getLocalizedMessage()} is called
     *        - may <em>not</em> be {@code null}.
     */
    public LicenseContentException(String resourceKey) {
        super(resourceKey);
    }

    public String getLocalizedMessage() {
        return Resources.getString(super.getMessage());
    }
}
